﻿
#include "zySplitter.h"

BlackMoonUI::zySplitter::zySplitter()
{
	SetMember(L"this", (LONG_PTR)this);
	m_obj->setWndProc(zySplitter_WndProc);
	m_obj->setDestroy(zySplitter_Destroy);
	SetMember(L"SplitterWidth", (LONG_PTR)4);
	SetMember(L"SplitterPos", (LONG_PTR)100);
	SetMember(L"SplitterMode", (LONG_PTR)分隔条方向_垂直);
	SetMember(L"SplitterDropMode", (LONG_PTR)分隔条拖动_放开更新);
	setType(zyType_Splitter);
}
BlackMoonUI::zySplitter::~zySplitter()
{

}
void WINAPI BlackMoonUI::zySplitter::zySplitter_Destroy(zyObject* obj)
{
	zySplitter* zyb = (zySplitter*)obj->getPtrData(L"this");
	zyb->OnNCDestroy();
	zyCustomCtrol::zyCustomCtrol_Destroy(obj);
}
LRESULT WINAPI BlackMoonUI::zySplitter::zySplitter_WndProc(zyObject* obj, HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL* bHandle)
{
	if (uMsg == WM_NCDESTROY) {
		zySplitter* zyb = (zySplitter*)obj->getPtrData(L"this");
		zyb->OnNCDestroy();
	}
	else if (uMsg == WM_SIZE) {
		zySplitter* zyb = (zySplitter*)obj->getPtrData(L"this");
		zyb->zySplitterWindow_OnSize(hWnd, LOWORD(lParam), HIWORD(lParam), 分隔条位置改变_尺寸改变);
	}
	else if (uMsg == WM_SETCURSOR) {
		if ((HWND)wParam == hWnd) {
			zySplitter* zyb = (zySplitter*)obj->getPtrData(L"this");
			LRESULT ret = zyb->zySplitterWindow_OnSetCursor(hWnd);
            if (ret != 0) {
				*bHandle = true;
                return ret;
            }
		}
	}
	else if (uMsg == WM_LBUTTONDOWN) {
		zySplitter* zyb = (zySplitter*)obj->getPtrData(L"this");
		zyb->zySplitterWindow_OnLButtonDown(hWnd, LOWORD(lParam), HIWORD(lParam));
	}
	else if (uMsg == WM_MOUSEMOVE) {
		zySplitter* zyb = (zySplitter*)obj->getPtrData(L"this");
		zyb->zySplitterWindow_OnMouseMove(hWnd, LOWORD(lParam), HIWORD(lParam));
	}
	else if (uMsg == WM_LBUTTONUP) {
		zySplitter* zyb = (zySplitter*)obj->getPtrData(L"this");
		zyb->zySplitterWindow_OnLButtonUp(hWnd, LOWORD(lParam), HIWORD(lParam));
	}
	return zyCustomCtrol::zyCustomCtrol_WndProc(obj, hWnd, uMsg, wParam, lParam, bHandle);
}

void BlackMoonUI::zySplitter::OnNCDestroy() {
	zyObject* pPanel1 = (zyObject*)GetMember(L"pPanel1");
	if (pPanel1 != nullptr) {
		pPanel1->release();
		//delete pPanel1;
		SetMember(L"pPanel1", 0);
	}

	zyObject* pPanel2 = (zyObject*)GetMember(L"pPanel2");
	if (pPanel2 != nullptr) {
		pPanel2->release();
		//delete pPanel2;
		SetMember(L"pPanel2", 0);
	}
	zyWidget* pThis = (zyWidget*)GetMember(L"pDrawWindow");
	if (pThis != nullptr) {
		delete pThis;
        SetMember(L"pDrawWindow", 0);
	}
}
void BlackMoonUI::zySplitter::zySplitterWindow_GetSplitterRect(HWND hWnd, RECT* rect) {
	int SplitterMode = (int)GetMember(L"SplitterMode");
	int SplitterPos = (int)GetMember(L"SplitterPos");
	int SplitterWidth = (int)GetMember(L"SplitterWidth");
	RECT rc = {0};
	GetClientRect(hWnd, &rc);
	if (SplitterMode == 分隔条方向_垂直) {
		*rect = { SplitterPos, 0, SplitterPos + SplitterWidth, rc.bottom };
	}
	else if (SplitterMode == 分隔条方向_水平) {
		*rect = { 0, SplitterPos, rc.right, SplitterPos + SplitterWidth };
	}
	else
		*rect = rc;
}
void BlackMoonUI::zySplitter::InitSplitterWindow() {
	
	HWND hWnd = 取窗口句柄();
	RECT rc = {0};
	GetWindowRect(hWnd, &rc);
	zyWidget* pThis = new zyWidget();
	if (pThis->创建(0, L"", POINT{rc.left, rc.top}, POINT{rc.right - rc.left, rc.bottom - rc.top}, WS_POPUP, WS_EX_LAYERED, true) == false)
        return ;
	SetMember(L"pDrawWindow", (LONG_PTR)pThis);
}
BOOL BlackMoonUI::zySplitter::zySplitterWindow_OnSize(HWND hWnd, int cx, int cy, int flag)
{
	zyObject* pPanel1 = (zyObject*)GetMember(L"pPanel1");
	zyObject* pPanel2 = (zyObject*)GetMember(L"pPanel2");
	int SplitterPos = (int)GetMember(L"SplitterPos");
	int SplitterWidth = (int)GetMember(L"SplitterWidth");
	int SplitterMode = (int)GetMember(L"SplitterMode");
	int Fixed2 = (int)GetMember(L"Fixed2");
	int MinWidth1 = (int)GetMember(L"MinWidth1");
	int MinWidth2 = (int)GetMember(L"MinWidth2");
	int width2 = 0;
	if (SplitterMode == 分隔条方向_垂直) {
		if (flag == 分隔条位置改变_尺寸改变 && Fixed2 != 0 && pPanel2 != 0) {
			HWND hWndPanel = (HWND)pPanel2->getPtrData(L"hWnd");
			RECT rc = {0};
			GetWindowRect(hWndPanel, &rc);
			width2 = rc.right - rc.left;
			if (width2 < MinWidth2)
				width2 = MinWidth2;
			SplitterPos = cx - width2 - SplitterWidth;
			if (SplitterPos < MinWidth1)
				SplitterPos = MinWidth1;
			SetMember(L"SplitterPos", SplitterPos);
		}
		else
			width2 = cx - SplitterPos - SplitterWidth;
		if (pPanel1) {
			HWND hWndPanel = (HWND)pPanel1->getPtrData(L"hWnd");
			if (IsWindow(hWndPanel))
				MoveWindow(hWndPanel, 0, 0, SplitterPos, cy, true);
		}
		if (pPanel2) {
			HWND hWndPanel = (HWND)pPanel2->getPtrData(L"hWnd");
			if (IsWindow(hWndPanel))
				MoveWindow(hWndPanel, SplitterPos + SplitterWidth, 0, width2, cy, true);
		}
	}else if (SplitterMode == 分隔条方向_水平) {
		if (flag == 分隔条位置改变_尺寸改变 && Fixed2 != 0 && pPanel2 != 0) {
			HWND hWndPanel = (HWND)pPanel2->getPtrData(L"hWnd");
			RECT rc = { 0 };
			GetWindowRect(hWndPanel, &rc);
			width2 = rc.bottom - rc.top;
			if (width2 < MinWidth2)
				width2 = MinWidth2;
			SplitterPos = cy - width2 - SplitterWidth;
			if (SplitterPos < MinWidth1)
				SplitterPos = MinWidth1;
			SetMember(L"SplitterPos", SplitterPos);
		}
		else
			width2 = cy - SplitterPos - SplitterWidth;
		if (pPanel1) {
			HWND hWndPanel = (HWND)pPanel1->getPtrData(L"hWnd");
			if (IsWindow(hWndPanel))
				MoveWindow(hWndPanel, 0, 0, cx, SplitterPos, true);
		}
		if (pPanel2) {
			HWND hWndPanel = (HWND)pPanel2->getPtrData(L"hWnd");
			if (IsWindow(hWndPanel))
				MoveWindow(hWndPanel,0, SplitterPos + SplitterWidth, cx, width2, true);
		}
	}
	TRegEvent* evtPtr = GetRegEvent(L"OnSplitterPosChange");
    int ret = 0;
	if(evtPtr)
		ret = evtPtr->handler<int>(hWnd, SplitterPos, width2, flag);
	return ret;
}
LRESULT BlackMoonUI::zySplitter::zySplitterWindow_OnSetCursor(HWND hWnd)
{
	POINT pt = {0};
	GetCursorPos(&pt);
	ScreenToClient(hWnd, &pt);
    RECT rc = {0};
	zySplitterWindow_GetSplitterRect(hWnd, &rc);
	int SplitterMode = (int)GetMember(L"SplitterMode");
	if (SplitterMode == 分隔条方向_垂直) {
		if (PtInRect(&rc, pt)) {
			return (LRESULT)SetCursor(LoadCursor(0, IDC_SIZEWE));
		}
	}else if (SplitterMode == 分隔条方向_水平) {
		if (PtInRect(&rc, pt)) {
			return (LRESULT)SetCursor(LoadCursor(0, IDC_SIZENS));
		}
	}
	return 0;
}

void BlackMoonUI::zySplitter::zySplitterWindow_OnLButtonDown(HWND hWnd, int x, int y)
{
	RECT rc = { 0 };
	zySplitterWindow_GetSplitterRect(hWnd, &rc);
	if (PtInRect(&rc, POINT{x,y}) !=0) {
		SetMember(L"BeginMove", 1);
		SetMember(L"BeginPosX", x);
		SetMember(L"BeginPosY", y);
		SetCapture(hWnd);
		int SplitterDropMode = (int)GetMember(L"SplitterDropMode");

	}
}

void BlackMoonUI::zySplitter::zySplitterWindow_OnMouseMove(HWND hWnd, int x, int y)
{
	int BeginMove = (int)GetMember(L"BeginMove");
	int SplitterDropMode = (int)GetMember(L"SplitterDropMode");
	if (BeginMove != 0) {
		int cx = (int)GetMember(L"BeginPosX");
		int cy = (int)GetMember(L"BeginPosY");
		int SplitterMode = (int)GetMember(L"SplitterMode");
		int SplitterPos = (int)GetMember(L"SplitterPos");
		int MinWidth1 = (int)GetMember(L"MinWidth1");
		int MinWidth2 = (int)GetMember(L"MinWidth2");
		int SplitterWidth = (int)GetMember(L"SplitterWidth");
		RECT rc = { 0 };
		GetClientRect(hWnd, &rc);
		if (SplitterMode == 分隔条方向_垂直) {
			SplitterPos = SplitterPos + x - cx;
			if (SplitterPos < MinWidth1) {
				SplitterPos = MinWidth1;
			}
			else if(SplitterPos + MinWidth2 + SplitterWidth > rc.right){
				if (MinWidth1 + SplitterWidth + MinWidth2 > rc.right)
					SplitterPos = (int)GetMember(L"SplitterPos");
				else
					SplitterPos = rc.right - SplitterWidth - MinWidth2;
			}
			SetMember(L"BeginPosX", SplitterPos);
			SetMember(L"BeginPosY", y);
		
		}else if (SplitterMode == 分隔条方向_水平) {
			SplitterPos = SplitterPos + y - cy;
			if (SplitterPos <= MinWidth1) {
				SplitterPos = MinWidth1;
			}
			else if (SplitterPos + MinWidth2 + SplitterWidth > rc.bottom) {
				if (MinWidth1 + SplitterWidth + MinWidth2 > rc.bottom)
					SplitterPos = (int)GetMember(L"SplitterPos");
				else
					SplitterPos = rc.bottom - SplitterWidth - MinWidth2;
			}
			SetMember(L"BeginPosX", x);
			SetMember(L"BeginPosY", SplitterPos);
		}

		if(SplitterPos == (int)GetMember(L"SplitterPos")) return ;
		SetMember(L"SplitterPos", SplitterPos);
		if (SplitterDropMode == 分隔条拖动_实时更新)
			zySplitterWindow_OnSize(hWnd, rc.right - rc.left, rc.bottom - rc.top, 分隔条位置改变_拖动);
		else
			zySplitterWindow_ShowDrawWindowAndDrawLine(SplitterWidth,zyRGB2ARGB(0xFF808080,55), SplitterPos);
	}
}

void BlackMoonUI::zySplitter::zySplitterWindow_OnLButtonUp(HWND hWnd, int x, int y)
{
	int BeginMove = (int)GetMember(L"BeginMove");
	if (BeginMove != 0) {
		SetMember(L"BeginMove", 0);
		int SplitterDropMode = (int)GetMember(L"SplitterDropMode");
		if (SplitterDropMode == 分隔条拖动_放开更新) {		
			int BeginPosX = (int)GetMember(L"BeginPosX");
			int BeginPosY = (int)GetMember(L"BeginPosY");
			RECT rc = {0};
			GetClientRect(hWnd, &rc);
			int SplitterMode = (int)GetMember(L"SplitterMode");
			int SplitterWidth = (int)GetMember(L"SplitterWidth");
			int SplitterPos = (int)GetMember(L"SplitterPos");
			zySplitterWindow_HideDrawWindow();
			ReleaseCapture();
			zySplitterWindow_OnSize(hWnd, rc.right - rc.left, rc.bottom - rc.top, 分隔条位置改变_拖动);
		}
		else {
			ReleaseCapture();
		}
	}
}
void BlackMoonUI::zySplitter::zySplitterWindow_HideDrawWindow() {
	zyWidget* pDrawWindow = (zyWidget*)GetMember(L"pDrawWindow");
	if(pDrawWindow == nullptr) return ;
	HWND hWnd = (HWND)pDrawWindow->GetMember(L"hWnd");
	if(IsWindow(hWnd) == 0) return;
	ShowWindow(hWnd, SW_HIDE);
}
void BlackMoonUI::zySplitter::zySplitterWindow_ShowDrawWindowAndDrawLine(int Width, int color,int pos) {
	zyWidget* pDrawWindow = (zyWidget*)GetMember(L"pDrawWindow");
	if (pDrawWindow == nullptr) return;
	HWND hWnd = (HWND)pDrawWindow->GetMember(L"hWnd");
	if (IsWindow(hWnd) == 0) return;
	int SplitterMode = (int)GetMember(L"SplitterMode");
	RECT rc = { 0 };
	GetWindowRect((HWND)GetMember(L"hWnd"), &rc);
	SetWindowPos(hWnd, HWND_TOPMOST, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, SWP_SHOWWINDOW | SWP_NOACTIVATE);
	zyBuffGraphics buff;
    buff.Create(rc.right - rc.left, rc.bottom - rc.top,0,true);
	Gdiplus::Graphics* g = buff.GetGraphics();
    g->Clear(Gdiplus::Color(0, 0, 0, 0));
	Gdiplus::SolidBrush brush(color);
	//std::wcout << pos <<L" " << 0 << L" " <<Width << L" " <<(int)(rc.bottom - rc.top) << std::endl;
	if (SplitterMode == 分隔条方向_垂直) {
		Gdiplus::Status lastResult = g->FillRectangle(&brush, pos, 0, Width, (int)(rc.bottom - rc.top));
		if (lastResult != Gdiplus::Ok) {
			return;
		}
	}
	else if (SplitterMode == 分隔条方向_水平) {
		g->FillRectangle(&brush, 0, pos, (int)(rc.right - rc.left), Width);
	}

	buff.复制到分层窗口(hWnd);
}
BOOL BlackMoonUI::zySplitter::创建(HWND 参数_父窗口, const std::wstring& 参数_标题, POINT 参数_位置, POINT 参数_尺寸, int 参数_ID, int 参数_窗口风格, int 参数_扩展风格)
{
	HINSTANCE hInstance = zyEnv::getInstance().getHandle();
	MyRegisterClass(hInstance, L"zySplitterWindow", 0, 0);
	if (参数_ID == NULL)
		参数_ID = 黑月默认ID();
	if (参数_尺寸.x == -1 && 参数_尺寸.y == -1) {
		RECT rc = { 0 };
		GetClientRect(参数_父窗口, &rc);
		参数_尺寸.x = rc.right - rc.left;
		参数_尺寸.y = rc.bottom - rc.top;
	}
	BOOL ret = _CreateWindow(参数_父窗口, 参数_标题, 参数_位置, 参数_尺寸, 参数_ID, 参数_窗口风格 | WS_CLIPCHILDREN, 
		参数_扩展风格 | WS_EX_CONTROLPARENT, L"zySplitterWindow");
	if (ret) {
		InitSplitterWindow();
	}
	return ret;
}

BOOL BlackMoonUI::zySplitter::创建(zyWindow& 参数_父窗口, const std::wstring& 参数_标题, POINT 参数_位置, POINT 参数_尺寸, int 参数_ID, int 参数_窗口风格, int 参数_扩展风格)
{

	HINSTANCE hInstance = zyEnv::getInstance().getHandle();
	MyRegisterClass(hInstance, L"zySplitterWindow", 0, 0);
	if (参数_ID == NULL)
		参数_ID = 黑月默认ID();
	if (参数_尺寸.x == -1 && 参数_尺寸.y == -1) {
		RECT rc = { 0 };
		GetClientRect(参数_父窗口.getHwnd(), &rc);
		参数_尺寸.x = rc.right - rc.left;
		参数_尺寸.y = rc.bottom - rc.top;
	}
	BOOL ret = _CreateWindow(参数_父窗口.getHwnd(), 参数_标题, 参数_位置, 参数_尺寸, 参数_ID, 参数_窗口风格 | WS_CLIPCHILDREN, 
		参数_扩展风格 | WS_EX_CONTROLPARENT, L"zySplitterWindow");
	if (ret) {
		InitSplitterWindow();
	}
	return ret;
}
bool BlackMoonUI::zySplitter::置面板1(zyWindow *参数_面板1) {
	zyObject* pPanel = (zyObject*)GetMember(L"pPanel1");
	if (pPanel != nullptr) {
		pPanel->release();
		//delete pPanel;
	}
	pPanel = 参数_面板1->getObject();
	pPanel->addRef();
	//IUnknown_AddRef(pPanel);
	SetMember(L"pPanel1", (LONG_PTR)pPanel);
	if (是否已创建()) {
		HWND hWnd = 取窗口句柄();
		RECT rc = { 0 };
		GetClientRect(hWnd, &rc);
		SetParent(参数_面板1->取窗口句柄(), hWnd);
		zySplitterWindow_OnSize(hWnd, rc.right - rc.left, rc.bottom - rc.top, 分隔条位置改变_尺寸改变);
	}
	return true;
}
bool BlackMoonUI::zySplitter::置面板2(zyWindow* 参数_面板2) {
	zyObject* pPanel = (zyObject*)GetMember(L"pPanel2");
	if (pPanel != nullptr) {
		pPanel->release();
		//delete pPanel;
	}
	pPanel = 参数_面板2->getObject();
	pPanel->addRef();
	SetMember(L"pPanel2", (LONG_PTR)pPanel);
	if (是否已创建()) {
		HWND hWnd = 取窗口句柄();
		RECT rc = { 0 };
		GetClientRect(hWnd, &rc);
		SetParent(参数_面板2->取窗口句柄(), hWnd);
		int Fixed2 = (int)GetMember(L"Fixed2");
		if (Fixed2 != 0) {
			int SplitterWidth = (int)GetMember(L"SplitterWidth");
			int SplitterPos = (int)GetMember(L"SplitterPos");
			int SplitterMode = (int)GetMember(L"SplitterMode");
			if (SplitterMode == 分隔条方向_垂直)
				参数_面板2->宽度(rc.right - rc.left - SplitterPos - SplitterWidth);
            else if (SplitterMode == 分隔条方向_水平)
				参数_面板2->高度(rc.bottom - rc.top - SplitterPos - SplitterWidth);
		}
		zySplitterWindow_OnSize(hWnd, rc.right - rc.left, rc.bottom - rc.top, 分隔条位置改变_尺寸改变);
	}
	return true;
}

int BlackMoonUI::zySplitter::方向(int 参数_方向) {//获取或设置分隔条模式。"分隔条方向_"开头常量
	int SplitterMode = (int)GetMember(L"SplitterMode");
	if (参数_方向 != -1) {
		SetMember(L"SplitterMode", 参数_方向);
		if (是否已创建()) {
			RECT rc = 取客户区矩形();
			zySplitterWindow_OnSize(取窗口句柄(), rc.right - rc.left, rc.bottom - rc.top, 分隔条位置改变_尺寸改变);
		}
	}
	return SplitterMode;
}
int BlackMoonUI::zySplitter::最小宽度1(int 参数_最小宽度1) {//获取或设置 面板1的最小宽度
	int MinWidth1 = (int)GetMember(L"MinWidth1");
	if (参数_最小宽度1 != -1) {
		SetMember(L"MinWidth1", 参数_最小宽度1);
		int SplitterPos = (int)GetMember(L"SplitterPos");
		if (参数_最小宽度1 >= SplitterPos) {
			SetMember(L"SplitterPos", 参数_最小宽度1);
		}
		if (是否已创建()) {
			RECT rc = 取客户区矩形();
			zySplitterWindow_OnSize(取窗口句柄(), rc.right - rc.left, rc.bottom - rc.top, 分隔条位置改变_尺寸改变);
		}
	}
	return MinWidth1;
}
int BlackMoonUI::zySplitter::最小宽度2(int 参数_最小宽度2) {//获取或设置 面板2的最小宽度
	int MinWidth2  = (int)GetMember(L"MinWidth2");
	if (参数_最小宽度2 != -1) {
		SetMember(L"MinWidth2", 参数_最小宽度2);
		if (是否已创建()) {
			RECT rc = 取客户区矩形();
			zySplitterWindow_OnSize(取窗口句柄(), rc.right - rc.left, rc.bottom - rc.top, 分隔条位置改变_尺寸改变);
		}
	}
	return MinWidth2;
}
int BlackMoonUI::zySplitter::分隔条宽度(int 参数_分隔条宽度) {//获取或设置 分隔条宽度
	int MinWidth2 = (int)GetMember(L"SplitterWidth");
	if (参数_分隔条宽度 != -1) {
		SetMember(L"SplitterWidth", 参数_分隔条宽度);
		if (是否已创建()) {
			RECT rc = 取客户区矩形();
			zySplitterWindow_OnSize(取窗口句柄(), rc.right - rc.left, rc.bottom - rc.top, 分隔条位置改变_尺寸改变);
		}
	}
	return MinWidth2;
}
int BlackMoonUI::zySplitter::分隔条位置(int 参数_分隔条位置) {//获取或设置 分隔条位置
	int SplitterPos = (int)GetMember(L"SplitterPos");
	if (参数_分隔条位置 != -1) {
		if (是否已创建()) {
			int SplitterMode = (int)GetMember(L"SplitterMode");
			int MinWidth1 = (int)GetMember(L"MinWidth1");
			int MinWidth2 = (int)GetMember(L"MinWidth2");
			int SplitterWidth = (int)GetMember(L"SplitterWidth");
			RECT rc = 取客户区矩形();
			if (SplitterMode == 分隔条方向_垂直) {
				SplitterPos = 参数_分隔条位置;
				if (SplitterPos < MinWidth1)
					SplitterPos = MinWidth1;
				else if (SplitterPos + MinWidth2 + SplitterWidth > rc.right) {
					if (MinWidth1 + SplitterWidth + MinWidth2 > rc.right) {
						SplitterPos = (int)GetMember(L"SplitterPos");
					}
					else {
						SplitterPos = rc.right - SplitterWidth - MinWidth2;
					}
				}
			}
			else if (SplitterMode == 分隔条方向_水平) {
				SplitterPos = 参数_分隔条位置;
				if (SplitterPos < MinWidth1)
					SplitterPos = MinWidth1;
				else if (SplitterPos + MinWidth2 + SplitterWidth > rc.bottom) {
					if (MinWidth1 + SplitterWidth + MinWidth2 > rc.bottom) {
						SplitterPos = (int)GetMember(L"SplitterPos");
					}
					else {
						SplitterPos = rc.bottom - SplitterWidth - MinWidth2;
					}
				}
			}
			if (SplitterPos == (int)GetMember(L"SplitterPos")) {
				return SplitterPos;
			}
			SetMember(L"SplitterPos", SplitterPos);
			zySplitterWindow_OnSize(取窗口句柄(), rc.right - rc.left, rc.bottom - rc.top, 分隔条位置改变_调用方法);
		}
		else {
			SetMember(L"SplitterPos", 参数_分隔条位置);
		}
	}
	return SplitterPos;
}
int BlackMoonUI::zySplitter::拖动模式(int 参数_拖动模式) {//"分隔条拖动_"开头常量 
	int SplitterDropMode = (int)GetMember(L"SplitterDropMode");
	if (参数_拖动模式 == -1) {
		SetMember(L"SplitterDropMode", 参数_拖动模式);
	}
	return SplitterDropMode;
}
bool BlackMoonUI::zySplitter::固定面板2(bool 参数_固定面板2) {
	int Fixed2 = (int)GetMember(L"Fixed2");
	SetMember(L"Fixed2", 参数_固定面板2);
	return Fixed2 != 0;
}
void  BlackMoonUI::zySplitter::事件_分隔条位置被改变(TRegEvent* 参数_事件指针) { SetRegEvent(L"OnSplitterPosChange", 参数_事件指针); }